package vip.ifmm.lehouse.common.enums.status;

import vip.ifmm.lehouse.common.enums.Statable;

/**
 * @author Red
 * email: 1318944013@qq.com
 * date: 2019/6/16 18:02
 */
public enum  UserLoginStatus implements Statable {
    SERVICE_IS_NOT_AVAILABLE(-1, "服务不可用"),
    USER_NOT_EXISTED(-1, "用户不存在"),
    USER_IS_EMPTY(-1, "用户名或密码为空"),
    LOGIN_SUCCESS(0, "登录成功"),
    GET_SESSION_SUCCESS(0, "获得session成功"),
    TOKEN_IS_NULL(-1, "获得session失败, token为空"),
    PASSWORD_USERNAME_NOT_RIGHT(-1, "用户名或密码不正确");

    private String msg;

    private int code;

    UserLoginStatus(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
